const db = require("../../../db");
const { SYSTEM_ERROR } = require("../../../utils/errorCode");
exports.main = (req, res) => {

    const { userId } = req.auth;
    // 获取购物车信息
    const sql = `select * from address where userId = ? and isDelete = 0 order by isDefault desc`;
    db.query(sql, userId, (err, result) => {
        if (err) {
            console.log(err);
            return res.err(SYSTEM_ERROR);
        }

        return res.sd(result);
    })
}

